* lisp/bindings.el: Put `ascii-character' property on keypad keys mapped to characters.
authorJuri Linkov <juri@jurta.org>
Sat, 14 Jun 2014 09:50:13 +0000 (12:50 +0300)
committerJuri Linkov <juri@jurta.org>
Sat, 14 Jun 2014 09:50:13 +0000 (12:50 +0300)
lisp/ChangeLog
lisp/bindings.el

index 15289f745d4c184199e5b63ec44a7ba044b27044..496389b7a1ccc300a827c0e1cd1589d20c3f91a1 100644 (file)
@@ -1,3 +1,8 @@
+2014-06-14  Juri Linkov  <juri@jurta.org>
+
+       * bindings.el: Put `ascii-character' property on keypad keys
+       mapped to characters.  (Bug#17759)
+
 2014-06-13  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/smie.el (smie-next-sexp): Fix up "other-end" info when
index 7093b8e662f1221275c02eb797b35abb0977cb7d..59aa3dfb3d3c9cf1e825607759769608d51e8cb6 100644 (file)
@@ -1075,10 +1075,14 @@ if `inhibit-field-text-motion' is non-nil."
              (kp-5 ?5) (kp-6 ?6) (kp-7 ?7) (kp-8 ?8) (kp-9 ?9)
              (kp-add ?+) (kp-subtract ?-) (kp-multiply ?*) (kp-divide ?/))))
   (dolist (pair keys)
-    (dolist (mod modifiers)
-      (define-key function-key-map
-       (vector (append mod (list (nth 0 pair))))
-       (vector (append mod (list (nth 1 pair))))))))
+    (let ((keypad (nth 0 pair))
+         (normal (nth 1 pair)))
+      (when (characterp normal)
+       (put keypad 'ascii-character normal))
+      (dolist (mod modifiers)
+       (define-key function-key-map
+         (vector (append mod (list keypad)))
+         (vector (append mod (list normal))))))))
 
 (define-key function-key-map [backspace] [?\C-?])
 (define-key function-key-map [delete] [?\C-?])